//
//  AboutUsViewController.m
//  哎游
//
//  Created by 林程杰 on 15/1/14.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "AboutUsViewController.h"
#import "Masonry.h"
#import "WebColor.h"

@implementation AboutUsViewController

- (void)dealloc
{
    [super dealloc];
}

- (instancetype) initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        
    }
    return self;
}

- (void) viewDidLoad
{
    [super viewDidLoad];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(100, 0, 45, 100)];
    label.textColor = [UIColor whiteColor];
    label.font = [UIFont fontWithName:@"TimesNewRomanPS-BoldMT" size:20];
    label.text = @"关于我们";
    self.navigationItem.titleView = label;
    
    UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 25, 25)];
    [button setBackgroundImage:[UIImage imageNamed:@"return.png"] forState:UIControlStateNormal];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
    [button addTarget:self action:@selector(returnBack) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view setBackgroundColor:[UIColor whiteColor]];
    [label release];
    [button release];
    [self creatView];
}

- (void) creatView
{
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    imageView.image = [UIImage imageNamed:@"launch.jpg"];
    [self.view addSubview:imageView];
    //标语
    UILabel *labelCom = [[UILabel alloc] init];
    [labelCom setTextColor:[UIColor whiteColor]];
    [labelCom setText:@"2015年  哎游项目组.AIYou."];
    [self.view addSubview:labelCom];
    
    [labelCom mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left).offset(self.view.frame.size.width / 2 - 100);
        make.bottom.equalTo(self.view.mas_bottom).offset(-10);
    }];
    //关于我们
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(60, self.view.frame.size.height / 2 - 110, 52, 30)];
    [label1 setText:@"康守帅"];
    [label1 setTextColor:[UIColor whiteColor]];
    [self.view addSubview:label1];
    
    [label1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left).offset(70);
        make.top.equalTo(self.view.mas_top).offset(self.view.frame.size.height / 2 - 110);
    }];

    
    
    UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(60, self.view.frame.size.height / 2 - 170, 52, 30)];
    [label2 setText:@"林程杰"];
    [label2 setTextColor:[UIColor whiteColor]];
    [self.view addSubview:label2];
    [label2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left).offset(70);
        make.top.equalTo(label1.mas_top).offset(60);
    }];

    
    UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(60, self.view.frame.size.height / 2 - 230, 52, 30)];
    [label3 setText:@"刘建镇"];
    [label3 setTextColor:[UIColor whiteColor]];
    [self.view addSubview:label3];
    [label3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left).offset(70);
        make.top.equalTo(label2.mas_top).offset(60);
    }];

    
    UILabel *label11 = [[UILabel alloc] init];
    [label11 setText:@"  20893454@qq.com"];
    [label11 setTextColor:[UIColor whiteColor]];
    [self.view addSubview:label11];
    [label11 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(label1.mas_right).offset(1);
        make.top.equalTo(self.view.mas_top).offset(self.view.frame.size.height / 2 - 110);
    }];
    
    UILabel *label22 = [[UILabel alloc] init];
    [label22 setText:@"  linchengjie1017@sina.com"];
    [label22 setTextColor:[UIColor whiteColor]];
    [self.view addSubview:label22];
    [label22 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(label2.mas_right).offset(1);
        make.top.equalTo(label11.mas_top).offset(60);
    }];
    
    UILabel *label33 = [[UILabel alloc] init];
    [label33 setText:@"  13055770577@163.com"];
    [label33 setTextColor:[UIColor whiteColor]];
    [self.view addSubview:label33];
    [label33 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(label3.mas_right).offset(1);
        make.top.equalTo(label22.mas_top).offset(60);
    }];
    
    UIImageView *imageView1 = [[UIImageView alloc] initWithFrame:CGRectMake(10, 160, 40, 40)];
    imageView1.layer.cornerRadius = 20;
    imageView1.clipsToBounds = YES;
    imageView1.image = [UIImage imageNamed:@"people1.png"];
     [self.view addSubview:imageView1];
    [imageView1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left).offset(10);
        make.top.equalTo(self.view.mas_top).offset(self.view.frame.size.height / 2 - 120);
        make.size.mas_equalTo(CGSizeMake(40, 40));
    }];

    
    
    UIImageView *imageView2 = [[UIImageView alloc] initWithFrame:CGRectMake(10, 220, 40, 40)];
    imageView2.layer.cornerRadius = 20;
    imageView2.clipsToBounds = YES;
    imageView2.image = [UIImage imageNamed:@"people33.png"];
    [self.view addSubview:imageView2];
    [imageView2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left).offset(10);
        make.top.equalTo(imageView1.mas_top).offset(60);
        make.size.mas_equalTo(CGSizeMake(40, 40));
    }];
    
    
    UIImageView *imageView3 = [[UIImageView alloc] initWithFrame:CGRectMake(10, 280, 40, 40)];
    imageView3.layer.cornerRadius = 20;
    imageView3.clipsToBounds = YES;
    imageView3.image = [UIImage imageNamed:@"people2.png"];
     [self.view addSubview:imageView3];
    [imageView3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left).offset(10);
        make.top.equalTo(imageView2.mas_top).offset(60);
        make.size.mas_equalTo(CGSizeMake(40, 40));
    }];
    
    
    [label1 release];
    [label11 release];
    [label2 release];
    [label22 release];
    [label3 release];
    [label33 release];
    [imageView1 release];
    [imageView2 release];
    [imageView3 release];
    [labelCom release];
    [imageView release];

}

- (void) returnBack
{
    [self.navigationController popToRootViewControllerAnimated:YES];
}






@end
